package com.mach.platform.controller;

import com.mach.platform.domain.OrderData;
import com.mach.platform.domain.Response;
import com.mach.platform.service.OrderDataServiceImpl;
import com.mach.platform.service.OrderServiceImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * PLC数据和
 */
@RestController
@RequestMapping("orderData")
public class OrderDataCtrl extends BaseCtrl<OrderData> {

    @Autowired
    private OrderDataServiceImpl orderDataService;

    @Override
    public Response info(Long id) {
        return null;
    }

    @Override
    public Response list(Pageable pageable, Map params) {
        return null;
    }

    @Override
    public Response delete(Long[] ids) {
        return null;
    }
    @ApiOperation(value = "保存", notes = "接口备注：无", produces = "application/json")
    @PostMapping("/add")
    @Override
    public Response save(@RequestBody OrderData orderData) {
        return Response.ok(orderDataService.save(orderData));
    }

    @Override
    public Response update(OrderData orderData) {
        return null;
    }
}
